<?php

use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateTableAdmins extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('admins', function (Blueprint $table){
            $table->increments('id')->comment('管理员编号');
            $table->string('name',32)->unique()->comment('管理员用户名');
            $table->string('email',32)->unique()->comment('邮箱');
            $table->string('password')->comment('密码');
            $table->enum('status',[0,1,2])->default('1')->comment('状态','禁用','激活','超级管理员');
            $table->rememberToken();
            $table->timestamps();
            $table->softDeletes();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::drop('admins');
    }
}
